home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Modules / config.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-01  |  2.9 KB  |  128 lines

  1.  
  2. /* Module configuration */
  3.  
  4. /* This file contains the table of built-in modules.
  5.    See init_builtin() in import.c. */
  6.  
  7. /**** I.J. 11/11/1995 ***/
  8. /* On the Amiga, you'll have to edit this file by hand to set up the *
  9. /* modules configuration (sorry)                       */
  10. /* Updated  8-dec-96 for Python 1.4                    */
  11. /* Updated 12-jan-98 for Python 1.5                    */
  12. /* Updated 25-dec-98 for I-Net225                      */
  13. /* Updated 25-apr-99 for Python 1.5.2                  */
  14. /*                (added sha, removed timing)          */
  15. /* Updated 16-okt-99 for 'network free' version        */
  16. /* Updated 12-sep-00 for Python 1.6                    */
  17. /*******************************************************/
  18.  
  19.  
  20. #include "Python.h"
  21.  
  22. #if defined(AMITCP) || defined(INET225)
  23.  
  24. /* special 'safe' init functions - they check library availabilities */
  25.  
  26. static void initpwd_check(void)
  27. {
  28.     if(!checkusergrouplib()) return;
  29.     initpwd();
  30. }
  31.  
  32. static void initgrp_check(void)
  33. {
  34.     if(!checkusergrouplib()) return;
  35.     initgrp();
  36. }
  37.  
  38. static void initcrypt_check(void)
  39. {
  40.     if(!checkusergrouplib()) return;
  41.     initcrypt();    
  42. }
  43.  
  44. static void initsyslog_check(void)
  45. {
  46.     if(!checksocketlib()) return;
  47.     initsyslog();
  48. }
  49.  
  50. static void initsocket_check(void)
  51. {
  52.     if(!checksocketlib()) return;
  53.     initsocket();
  54. }
  55.  
  56. static void initselect_check(void)
  57. {
  58.     if(!checksocketlib()) return;
  59.     initselect();
  60. }
  61.  
  62. #endif /* AmiTCP or Inet225 */
  63.  
  64.  
  65. struct _inittab _PyImport_Inittab[] = {
  66.  
  67. /************ HERE YOU NEED TO INSTALL ALL DESIRED MODULES!!!! **************/
  68.  
  69.     {"amiga",initamiga},
  70.     {"ARexxll",initARexx},
  71.     {"Doslib", initDoslib },
  72. //    {"amiga_exec", initamiga_exec },
  73. //    {"simplegfx", initsimplegfx },  // XXX experimental
  74.  
  75.     {"array",initarray},
  76.     {"binascii",initbinascii}, 
  77.     {"cmath",initcmath},
  78.     {"math",initmath},
  79.     {"new",initnew},
  80.     {"errno",initerrno},
  81.     {"environment",initenvironment},
  82.     {"regex",initregex},
  83.     {"pcre",initpcre},
  84.     {"strop",initstrop},
  85.     {"struct",initstruct},
  86.     {"time",inittime},
  87. //    {"timing",inittiming},        // XXX obsolete
  88.     {"md5",initmd5}, 
  89. //    {"soundex",initsoundex},
  90.     {"rotor",initrotor},
  91.     {"operator",initoperator},
  92.     {"cStringIO",initcStringIO},
  93.     {"cPickle",initcPickle},
  94.     {"sha",initsha},
  95. //    {"zlib",initzlib},
  96.     {"_codecs", init_codecs},
  97.     {"_sre", init_sre},
  98.     {"unicodedata", initunicodedata},
  99.  
  100. #if defined(AMITCP) || defined(INET225)
  101.     /* Use the lib-checking init functions defined above */
  102.     {"pwd",initpwd_check},
  103.     {"grp",initgrp_check},
  104.     {"crypt",initcrypt_check},
  105.     {"select",initselect_check},
  106.     {"socket",initsocket_check},
  107.     {"syslog",initsyslog_check},
  108. #endif
  109.  
  110. /*  {"signal",initsignal}, */
  111.  
  112. /****************************************************** I.J. 10/12/1996 *****/
  113.  
  114.     /* This module "lives in" with marshal.c */
  115.     {"marshal", PyMarshal_Init},
  116.  
  117.     /* This lives in with import.c */
  118.     {"imp", initimp},
  119.  
  120.     /* These entries are here for sys.builtin_module_names */
  121.     {"__main__", NULL},
  122.     {"__builtin__", NULL},
  123.     {"sys", NULL},
  124.  
  125.     /* Sentinel */
  126.     {0, 0}
  127. };
  128.